package homework.work3.controller;

import homework.work3.model.Product;
import homework.work3.service.ProductService;
import homework.work3.service.ProductServiceImpl;

public class ProductController {
    private ProductService service = new ProductServiceImpl();

    public Product[] getAllProducts() {
        return service.getAllProducts();

    }

    public boolean addProduct(Product product) {
        return service.addProduct(product);
    }

    public Product getProductsID(int i) {

        return service.getProductsID(1);
    }

    public Product getProductsName(String name) {
        return service.getProductsName(name);
    }

    public Product updateProductID(Product p) {
        return service.updateProduct(p);
    }
}
